﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
using Capstone_project.DatabaseAccessLayer;

namespace Capstone_project.BussnessLogicLayer
{
    class StaffBUS
    {
        ConnectData connData = new ConnectData();
        public DataTable getList()
        {
            string sql = "SELECT USER_NAME,FULL_NAME,ADDRESS,BIRTHDAY,PHONE,GENER FROM USER_INFORMATION";
            return connData.getData(sql, true);
        }
        public DataTable getUserlist()
        {
            string sql = "SELECT USER.USER_NAME, USER.ID_STATUS, USER.ID_DEPARTMENT FROM [USER]";
            return connData.getData(sql, true);
        }
        public string nextID()
        {
            string lastID = connData.getLastID("USER_INFORMATION", "USER_NAME").Trim();
            return Common.NextID(lastID, "");
        }
    }
}
